<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shops', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',50)->default('')->comment('店铺名称');
            $table->string('address',200)->default('')->comment('店铺地址');
            $table->integer('storage_id')->unsigned()->index()->default('0')->comment('关联仓库ID');
            $table->string('remarks')->default('')->comment('备注');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `shops` comment '店铺表'");

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shops');
    }
}
